package r5.powtorka6;

public class Book implements Comparable<Book> {

	private String title;
	private String author;
	private int ranking;

	public Book(String title, String author, int ranking) {
		this.title = title;
		this.author = author;
		this.ranking = ranking;
	}

	public String getTitle() {
		return title;
	}

	public String getAuthor() {
		return author;
	}

	public int getRanking() {
		return ranking;
	}

	public int compareTo(Book b) {
		return this.author.compareTo(b.getAuthor());
	}

}
